<div class="page_head">
  <h2><%="Global Setting".t%></h2>
</div>
<%if flash[:notice]%>
 <div class='error_flash'><%=flash[:notice] / ("[" + @size.width.to_s + "px * " + @size.height.to_s + "px]")%></div>
<%end%>

  <h2><%="Your Logo".t%></h2>
  <%="Your logo appears on the login screen, the Dashboard, and the project home page.".t%> 
  <%="The logo must be in GIF,PNG,JPG format and can't be more than 200 pixels wide.".t%> 
  <%if File.exist?("#{RAILS_ROOT}/public/files/logos/#{@cur_user.company.id}/logo.gif")%>
  <div class=logo>
  <table>
    <tr>
     <td><%=image_tag("/files/logos/#{@cur_user.company.id}/logo.gif")%></td>
     <td><%=link_to"Delete this logo".t,{:action=>'delete_logo'},{:onclick=>"Element.show('indicator_del_logo')",:class=>'admin',:confirm=>"Are you sure?".t}%><%=indicator("del_logo")%></td>
    </tr>
  </table>
  </div>
  <%end%>
  <div class=logo_sub>
   <%form_for :logo,:url=>{:action=>'upload_logo'},:html=>{:multipart=>true} do%>
     <%=file_field_tag :file,:size=>60%><br/> 
     <%=indicator('sub_form')%>
     <%=submit_tag "Upload logo".t,:onclick=>"Element.show('indicator_sub_form')"%>
      <%="<span class=intro_txt>" + "and replace the current one".t + "</span>" if File.exist?("#{RAILS_ROOT}/public/files/logos/#{@cur_user.company.id}/logo.gif")%>
   <%end%>
  </div>
  <h2><%="Your trikr site name".t%></h2>
  <%="The trikr site name appears at the top of every page.".t%>
  <%form_for :company,:url=>{:action=>'update_name'} do |f|%>
  <div class=logo>
   <%=f.text_field"name"%>
   <%=f.hidden_field :id,:value=>@cur_user.company.id%>
  </div>  
  <hr class='black'>
  <%=submit_tag "Save Changes".t%>
  <%end%>

  <h2><%="Your site account owner".t%></h2>
  <%="Change the account owner of your site".t%>
  <%form_for :company,:url=>{:action=>'update_owner'} do |f|%>
  <div class=logo>
   <%=f.select :owner_id,@company.users.collect{|u| [u.name,u.id]}%>
  </div>  
  <hr class='black'>
  <%=submit_tag "Save Changes".t%>
  <%end%>
</div>
